﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace aaaSoft.SkinEngine.SkinHelpers
{
    class ShapeHelper
    {
        #region 判断点是否在矩形中
        /// <summary>
        /// 判断点是否在矩形中
        /// </summary>
        /// <param name="pt">点</param>
        /// <param name="rect">矩形</param>
        /// <returns></returns>
        public static bool PointInRect(Point pt, Rectangle rect)
        {
            return ((((pt.X >= rect.Left) & (pt.X < rect.Right)) & (pt.Y >= rect.Top)) & (pt.Y < rect.Bottom));
        }
        #endregion
    }
}
